<template>
  <div class="homeBanner">
    <XtSlider :sliders="bannerList"></XtSlider>
  </div>
</template>

<script>
// 导入获得图片方法
import { homeBanner } from '@/api/home/index.js'
import { ref } from 'vue'
export default {
  setup () {
    const bannerList = ref([])
    async function loadHomeBannerList () {
      const res = await homeBanner()
      bannerList.value = res.result
      console.log(res, '777')
    }
    // 调用函数
    loadHomeBannerList()

    return {
      bannerList
    }
  }
}
</script>

<style lang="less" scoped>
.homeBanner{
   width: 1240px;
  height: 450px;
  position: absolute;
  left: 250px;
  top: 168px;
  z-index: 98;
}
</style>
